<?php
require_once  __DIR__ . '/includes/authenticate.php';
?>

<h2>Training</h2>

<br>

<div class="" ="container-fluid">
	<div class="row">
		<div class="col-md-3"></div>
		<div class="col-md-6">		
			 <div class="dropdown">
  				<button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown">Training
  				<span class="caret"></span></button>
  					<ul class="dropdown-menu">
  					 	<li class="dropdown-header">Presence</li> 
   						<li><a href="javascript:callAdminPage('training_addpresence')">Add Presence</a></li>
    					<li><a href="javascript:callAdminPage('training_viewpresence')">View Presence Date</a></li>
    					<li><a href="javascript:callAdminPage('training_viewpresenceweek')">View Presence Week</a></li>
    					<li><a href="javascript:callAdminPage('training_viewpresencecumu')">View Presence Season</a></li>
 						
            <li class="divider"></li> 
 						<li class="dropdown-header">Stats</li> 
 						<li><a href="javascript:callAdminPage('training_addftladderstats')">Add FT-ladder Stats</a></li>
            <li><a href="javascript:callAdminPage('training_viewftladderstats')">View FT-ladder Stats Season</a></li>
    				<li><a href="javascript:callAdminPage('training_addshuttlerunstats')">Add Shuttle-run Stats</a></li>
             <li><a href="javascript:callAdminPage('training_viewshuttlerunplayerstats')">View Shuttle-run Player Stats</a></li>  
             <li><a href="javascript:callAdminPage('training_viewshuttlerunteamstats')">View Shuttle-run Team Stats</a></li> 
    				<li><a href="javascript:callAdminPage('training_addftstats')">Add FT Stats</a></li>
    				<li><a href="javascript:callAdminPage('training_viewftstatsweek')">View FT Stats Week</a></li>
            <li><a href="javascript:callAdminPage('training_viewftstatscumu')">View FT Stats Season</a></li>

              <li class="divider"></li> 
    					<li class="dropdown-header">General Info</li> 
    					<li><a href="javascript:callAdminPage('training_addgeninfo')">Add General Training Info</a></li>
    					<li><a href="javascript:callAdminPage('training_viewgeninfo')">View General Training Info</a></li>
    				</ul>
    		</div>
    		<br/><br/>
			<div id="trainingcontent"></div>
		</div>
		<div class="col-md-3"></div>
	</div>

</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>

<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>

<script type="text/javascript">

function callAdminPage(page){
  $.ajax({
  cache: false,
  type: "GET",
  url: "./" + page + ".php",
  success: function(data) {
  	$("#trainingcontent").html(data);
  }
  }) 
};

</script>
